package org.summerframework.component.upload;


import org.summerframework.core.base.result.ResultCode;

/**
 * 返回code
 * 800
 *
 * @author 石超
 * @version v1.0.0
 */
public enum UploadResultCode implements ResultCode {
    SUCCESS(0, "success"),

    PIC_NOT_NULL(800,"至少上传一张图片"),
    ERROR_NOT_UPLOAD_FILE(801,"至少上传一个文件"),
    FILE_UPLOADIMAGE_NOT_FILE(802,"请上传对应的文件类型!"),
    ERROR_UNSUPPORTED_IMAGE_TYPE(803, "不支持的文件"),
    ERROR_UPLOAD_FAILURE(804, "上传失败"),
    ERROR_NOT_SUFFIX(805, "请按照规范上次文件"),
    ERROR_INIT_CLIENT(806, "初始化客户端失败")
    ;
    private int code;

    private String msg;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public String toString() {
        return code + ":" + msg;
    }

    private UploadResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
